package com.fenyin.samples.study.jprofiler.memory;  

import java.util.ArrayList;
import java.util.List;
  
public class MemoryAnalyer {
	private final static int _1MB = 1024*1024;
	
	public static class MemoryObject{
		private byte[] data = new byte[_1MB]; 
	}
	
	public static void main(String[] args) throws InterruptedException{
		
		List<MemoryObject> list = new ArrayList<MemoryObject>();
		System.out.println("初始化完成");
		Thread.sleep(1*60*1000);
		System.out.println("准备执行");
		for(int i=0;i<10;i++){
			System.out.println("开始第"+i+"次执行....");
			MemoryObject obj = new MemoryObject();
			list.add(obj);
			Thread.sleep(1*60*1000);
		}
		System.out.println("执行完毕");
	}
}
